#include"TcpServer.hpp"
#include<memory>

using namespace std;

void Usage(std::string proc)
{
  cout << "\n\rUsage: " << proc << "port[1024+]\n" << endl;
}
int main(int argc,char* argv[])
{
  if(argc != 2)
  {
    Usage(argv[0]);
    exit(-3);
  }
  uint16_t port = stoi(argv[1]);
  std::unique_ptr<TcpServer> ts(new TcpServer(port));
  ts->Init();
  ts->Run();

 return 0;
}